/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package christieprogram;

/**
 *
 * @author Alex
 */
public class Pair<L,R> {
  private final L Key;
  private final R Value;

  public Pair(L left, R right) {
    this.Key = left;
    this.Value = right;
  }
  
  public L getKey() { return Key; }
  public R getValue() { return Value; }

  @Override
  public int hashCode() { return Key.hashCode() ^ Value.hashCode(); }

  @Override
  public boolean equals(Object o) {
    if (o == null) return false;
    if (!(o instanceof Pair)) return false;
    Pair pairo = (Pair) o;
    return this.Key.equals(pairo.getKey()) &&
           this.Value.equals(pairo.getValue());
  }
}
